]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/network: Disconnect signal handler on destroy in NMConnectionItem
authorSebastian Keller <skeller@gnome.org>
Tue, 30 Mar 2021 14:37:05 +0000 (16:37 +0200)
committerMarge Bot <marge-bot@gnome.org>
Wed, 31 Mar 2021 10:31:12 +0000 (10:31 +0000)
Otherwise this can trigger _sync() calls after the objects it is trying
to update have been destroyed.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4013

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1782>

js/ui/status/network.js

index 50423048c588a90f9843cec2c3c1a5faab9c0664..5487fde40fe403d875591f91472621d24f0162c5 100644 (file)
@@ -128,6 +128,11 @@ var NMConnectionItem = class {
     }
 
     destroy() {
+        if (this._activeConnectionChangedId) {
+            this._activeConnection.disconnect(this._activeConnectionChangedId);
+            this._activeConnectionChangedId = 0;
+        }
+
         this.labelItem.destroy();
         this.radioItem.destroy();
     }